home *** CD-ROM | disk | FTP | other *** search
/ IBM InfoROM for OS/2 Beta 1995 January / IBM InfoROM for OS2 Beta 1-1995.ISO / testcert / mmedia / system / ap2 / scripts / x1____i5.p2s < prev    next >
Encoding:
Text File  |  1994-01-07  |  17.1 KB  |  734 lines

  1. # DESCRIPTION:
  2. # --------------------------------------------------------------
  3. #
  4. # open and switch through all valid states for cdxa in two
  5. # different processes, only one sound card, one cd with xa disc,
  6. # will involve resource contention for sound card and cd. To
  7. # include masteraudio set/query for each process.
  8. # [switch mode each device[switch state each device]].
  9. #
  10. #   NOTE: Use a different XA file for each load.
  11. #
  12. # --------------------------------------------------------------
  13. @PROCESSES=2
  14. @EVENTS={THREAD1=1,THREAD2=0,BREAKPOINT=0}
  15.  
  16. defaultconnection cdxa make type xa stream to ampmix totype amp stream wait
  17.  
  18. @PROCESS 1
  19. @BREAK              A CDXA WILL NEED TO BE IN THE DEFAULT CD-ROM DRIVE
  20. @SET_EVENT BREAKPOINT 1
  21.  
  22. # set masteraudio level for session to 10% - will affect both
  23. # processes
  24.  
  25. masteraudio volume 10
  26.  
  27. # open cdxa device non-exclusively
  28.  
  29. open cdxa alias cdxa_1 shareable notify
  30. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_OPEN #1
  31. @WAIT_NOTIFY 1 45000
  32. @WAIT_NOTIFY 21 45000
  33.  
  34. # no way of knowing which open (in which process) was the last
  35. # to complete. All opens were non-exclusive. Need to do an
  36. # acquire to make sure process 1 has the active instance
  37.  
  38. acquire cdxa_1 wait
  39. @WAIT_PASSDEVICE cdxa_1 45000
  40.  
  41. # load element from *LOCAL* CD device and play asynchronously
  42. # for 10 seconds
  43.  
  44.  
  45. # /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
  46. # --------------------------------------------------------------
  47. #
  48. # The \PATH\FILENAME.EXT on the following command line will need
  49. # to be changed to a path and filename on your test CDXA Disk.
  50. #                     --- SEE BELOW ---
  51. # --------------------------------------------------------------
  52. # \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
  53.  
  54. load cdxa_1 \PATH\FILENAME.EXT wait
  55. status cdxa_1 mode wait
  56. =stopped
  57.  
  58. play cdxa_1 from 10000 to 40000
  59. status cdxa_1 mode wait
  60. =playing
  61. @PAUSE 10000
  62.  
  63. @SET_EVENT THREAD1 0
  64. @SET_EVENT THREAD2 1
  65. @WAIT_EVENT THREAD1 45000
  66.  
  67. # regain control
  68.  
  69. acquire cdxa_1 wait
  70. @WAIT_PASSDEVICE cdxa_1 45000
  71.  
  72. # load element from *LOCAL* CD device and play asynchronously
  73. # for 10 seconds
  74.  
  75. # /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
  76. # --------------------------------------------------------------
  77. #
  78. # The \PATH\FILENAME.EXT on the following command line will need
  79. # to be changed to a path and filename on your test CDXA Disk.
  80. #                     --- SEE BELOW ---
  81. # --------------------------------------------------------------
  82. # \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
  83.  
  84. load cdxa_1 \PATH\FILENAME.EXT wait
  85. status cdxa_1 mode wait
  86. =stopped
  87.  
  88. play cdxa_1 from 10000 to 40000
  89. status cdxa_1 mode wait
  90. =playing
  91.  
  92. @PAUSE 10000
  93. @SET_EVENT THREAD1 0
  94. @SET_EVENT THREAD2 1
  95. @WAIT_EVENT THREAD1 45000
  96.  
  97. # regain control
  98.  
  99. acquire cdxa_1 wait
  100. @WAIT_PASSDEVICE cdxa_1 45000
  101.  
  102. # load element from *LOCAL* CD device and play asynchronously
  103. # for 10 seconds
  104.  
  105. # /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
  106. # --------------------------------------------------------------
  107. #
  108. # The \PATH\FILENAME.EXT on the following command line will need
  109. # to be changed to a path and filename on your test CDXA Disk.
  110. #                     --- SEE BELOW ---
  111. # --------------------------------------------------------------
  112. # \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
  113.  
  114. load cdxa_1 \PATH\FILENAME.EXT wait
  115. status cdxa_1 mode wait
  116. =stopped
  117.  
  118. play cdxa_1 from 10000 to 40000
  119. status cdxa_1 mode wait
  120. =playing
  121.  
  122. @PAUSE 10000
  123. @SET_EVENT THREAD1 0
  124. @SET_EVENT THREAD2 1
  125. @WAIT_EVENT THREAD1 45000
  126.  
  127. # regain control
  128.  
  129. acquire cdxa_1 wait
  130. @WAIT_PASSDEVICE cdxa_1 45000
  131.  
  132. # enable internal speaker by setting connector for associated
  133. # ampmixer instance
  134.  
  135. connector cdxa_1 enable type speakers notify
  136. =!Connector type is not supported by this device.
  137.  
  138. # load an element from MTSDEMO disc on *LOCAL* drive
  139.  
  140. # /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
  141. # --------------------------------------------------------------
  142. #
  143. # The \PATH\FILENAME.EXT on the following command line will need
  144. # to be changed to a path and filename on your test CDXA Disk.
  145. #                     --- SEE BELOW ---
  146. # --------------------------------------------------------------
  147. # \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
  148.  
  149. load cdxa_1 \PATH\FILENAME.EXT wait
  150. status cdxa_1 mode wait
  151. =stopped
  152.  
  153. # cue cdxa for play
  154.  
  155. cue cdxa_1 output notify
  156. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_CUE #3
  157. @WAIT_NOTIFY 3 45000
  158.  
  159. # play cdxa asynchronously for 3 seconds
  160.  
  161. play cdxa_1
  162. status cdxa_1 mode wait
  163. =playing
  164. @PAUSE 3000
  165.  
  166. # close cdxa device instance
  167.  
  168. close cdxa_1 wait
  169.  
  170. # open another cdxa device instance non-exclusively
  171.  
  172. open cdxa alias cdxa_1 shareable wait
  173. status cdxa_1 mode wait
  174. =not ready
  175.  
  176. # load an element from MTSDEMO disc on *LOCAL* drive
  177.  
  178. @WAIT_PASSDEVICE cdxa_1 45000
  179.  
  180. # /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
  181. # --------------------------------------------------------------
  182. #
  183. # The \PATH\FILENAME.EXT on the following command line will need
  184. # to be changed to a path and filename on your test CDXA Disk.
  185. #                     --- SEE BELOW ---
  186. # --------------------------------------------------------------
  187. # \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
  188.  
  189. load cdxa_1 \PATH\FILENAME.EXT wait
  190. status cdxa_1 mode wait
  191. =stopped
  192.  
  193. # cue cdxa for play
  194.  
  195. cue cdxa_1 output wait
  196.  
  197. # play cdxa for 5 seconds
  198.  
  199. play cdxa_1 notify
  200. +MM_MCINOTIFY MCI_NOTIFY_ABORTED MCI_PLAY
  201. @PAUSE 5000
  202.  
  203. @SET_EVENT THREAD1 0
  204. @SET_EVENT THREAD2 1
  205. @WAIT_EVENT THREAD1 60000
  206.  
  207. # recover control of resource (cd device/acpa) from process 1.
  208. # play of cdxa will resume. allow play to continue for
  209. # 5 seconds
  210.  
  211. acquire cdxa_1 wait
  212. @WAIT_PASSDEVICE cdxa_1 45000
  213. @PAUSE 5000
  214.  
  215. # pause play of cdxa
  216.  
  217. pause cdxa_1 notify
  218. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_PAUSE #5
  219. @WAIT_NOTIFY 5 45000
  220.  
  221. @SET_EVENT THREAD1 0
  222. @SET_EVENT THREAD2 1
  223. @WAIT_EVENT THREAD1 45000
  224.  
  225. # recover exclusive control of resource (cd device/acpa) from
  226. # process 1
  227.  
  228. acquire cdxa_1 exclusive wait
  229.  
  230. @SET_EVENT THREAD1 0
  231. @SET_EVENT THREAD2 1
  232. @WAIT_EVENT THREAD1 45000
  233.  
  234. # allow play to resume for 5 seconds
  235.  
  236. resume cdxa_1 notify
  237. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_RESUME
  238. @PAUSE 5000
  239.  
  240. # release exclusive control of resource
  241.  
  242. release cdxa_1 wait
  243.  
  244. @SET_EVENT THREAD1 0
  245. @SET_EVENT THREAD2 1
  246. @WAIT_EVENT THREAD1 45000
  247.  
  248.  
  249. acquire cdxa_1 wait
  250. @WAIT_PASSDEVICE cdxa_1 45000
  251.  
  252. # immediately stop play of cdxa
  253.  
  254. stop cdxa_1 notify
  255. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_STOP #8
  256. @WAIT_NOTIFY 8 45000
  257.  
  258. # release exclusive control of resource
  259.  
  260. release cdxa_1 wait
  261.  
  262. @SET_EVENT THREAD1 0
  263. @SET_EVENT THREAD2 1
  264. @WAIT_EVENT THREAD1 45000
  265.  
  266. acquire cdxa_1 wait
  267. @WAIT_PASSDEVICE cdxa_1 45000
  268.  
  269. # seek to start of media (currently loaded file)
  270.  
  271. seek cdxa_1 to start notify
  272. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_SEEK #10
  273. @WAIT_NOTIFY 10 45000
  274.  
  275. # release exclusive control of resource
  276.  
  277. release cdxa_1 wait
  278.  
  279. @SET_EVENT THREAD1 0
  280. @SET_EVENT THREAD2 1
  281. @WAIT_EVENT THREAD1 45000
  282.  
  283. # recover control of resource (cd device/acpa) from process 1
  284.  
  285. acquire cdxa_1 wait
  286. @WAIT_PASSDEVICE cdxa_1 45000
  287.  
  288. # query status then disable speakers connector (disables internal
  289. # speaker)
  290.  
  291. connector cdxa_1 query type speakers wait
  292. =!Connector type is not supported by this device.
  293.  
  294. # play for 3 seconds
  295.  
  296. play cdxa_1 notify
  297. +MM_MCINOTIFY MCI_NOTIFY_ABORTED MCI_PLAY
  298. @PAUSE 3000
  299.  
  300. @SET_EVENT THREAD1 0
  301. @SET_EVENT THREAD2 1
  302. @WAIT_EVENT THREAD1 45000
  303.  
  304. # recover exclusive control of resource (cd device/acpa) from process 1
  305.  
  306. acquire cdxa_1 exclusive wait
  307. @WAIT_PASSDEVICE cdxa_1 45000
  308.  
  309. # pause the play
  310.  
  311. pause cdxa_1 notify
  312. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_PAUSE #14
  313. @WAIT_NOTIFY 14 45000
  314.  
  315. # release exclusive control of resource
  316.  
  317. release cdxa_1 wait
  318.  
  319. @SET_EVENT THREAD1 0
  320. @SET_EVENT THREAD2 1
  321. @WAIT_EVENT THREAD1 45000
  322.  
  323. # recover exclusive control of resource (cd device/acpa) from process 1
  324.  
  325. acquire cdxa_1 exclusive wait
  326. @WAIT_PASSDEVICE cdxa_1 45000
  327.  
  328. # resume play for 3 seconds
  329.  
  330. resume cdxa_1 notify
  331. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_RESUME
  332. @PAUSE 3000
  333.  
  334. # release exclusive control of resource
  335.  
  336. release cdxa_1 wait
  337.  
  338. @SET_EVENT THREAD1 0
  339. @SET_EVENT THREAD2 1
  340. @WAIT_EVENT THREAD1 45000
  341.  
  342. # recover exclusive control of resource (cd device/acpa) from process 1
  343.  
  344. acquire cdxa_1 exclusive wait
  345. @WAIT_PASSDEVICE cdxa_1 45000
  346.  
  347. # stop play
  348.  
  349. stop cdxa_1 notify
  350. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_STOP #17
  351. @WAIT_NOTIFY 17 45000
  352.  
  353. # release exclusive control of resource (cd device/acpa) from process 1
  354.  
  355. release cdxa_1 wait
  356.  
  357. @SET_EVENT THREAD1 0
  358. @SET_EVENT THREAD2 1
  359. @WAIT_EVENT THREAD1 45000
  360.  
  361.  
  362. # instance is inactive. Do some statuses
  363.  
  364. status cdxa_1 time format wait
  365. =mmtime
  366.  
  367. status cdxa_1 ready wait
  368. =FALSE
  369.  
  370. # recover control of resource (cd device/acpa) from process 1
  371.  
  372. acquire cdxa_1 wait
  373. @WAIT_PASSDEVICE cdxa_1 45000
  374.  
  375. # seek to end of media (currently loaded element)
  376.  
  377. seek cdxa_1 to end notify
  378. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_SEEK #19
  379. @WAIT_NOTIFY 19
  380.  
  381. @SET_EVENT THREAD1 0
  382. @SET_EVENT THREAD2 1
  383. @WAIT_EVENT THREAD1 45000
  384.  
  385. # close cdxa instance for process 1 (xa1)
  386.  
  387. close cdxa_1 notify
  388. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_CLOSE #20
  389. @WAIT_NOTIFY 20 45000
  390.  
  391. @SET_EVENT THREAD1 0
  392. @SET_EVENT THREAD2 1
  393. @WAIT_EVENT THREAD1 45000
  394.  
  395.  
  396.  
  397.  
  398.  
  399. @PROCESS 2
  400. @WAIT_EVENT BREAKPOINT
  401.  
  402. # open a non-exclusive cdxa instance for process 2
  403.  
  404. open cdxa alias cdxa_2 shareable notify
  405. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_OPEN #21
  406.  
  407. @WAIT_EVENT THREAD2 45000
  408.  
  409. # recover control from process 1
  410.  
  411. acquire cdxa_2 wait
  412. @WAIT_PASSDEVICE cdxa_2 45000
  413.  
  414. # load element from *LOCAL* CD device and play asynchronously
  415. # for 10 seconds
  416.  
  417. # /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
  418. # --------------------------------------------------------------
  419. #
  420. # The \PATH\FILENAME.EXT on the following command line will need
  421. # to be changed to a path and filename on your test CDXA Disk.
  422. #                     --- SEE BELOW ---
  423. # --------------------------------------------------------------
  424. # \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
  425.  
  426. load cdxa_2 \PATH\FILENAME.EXT wait
  427. status cdxa_2 mode wait
  428. =stopped
  429.  
  430. play cdxa_2 from 10000 to 40000
  431.  
  432. @PAUSE 10000
  433. @SET_EVENT THREAD2 0
  434. @SET_EVENT THREAD1 1
  435. @WAIT_EVENT THREAD2 45000
  436.  
  437. # regain control
  438.  
  439. acquire cdxa_2 wait
  440. @WAIT_PASSDEVICE cdxa_2 45000
  441.  
  442. # load element from *LOCAL* CD device and play asynchronously
  443. # for 10 seconds
  444.  
  445. # /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
  446. # --------------------------------------------------------------
  447. #
  448. # The \PATH\FILENAME.EXT on the following command line will need
  449. # to be changed to a path and filename on your test CDXA Disk.
  450. #                     --- SEE BELOW ---
  451. # --------------------------------------------------------------
  452. # \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
  453.  
  454. load cdxa_2 \PATH\FILENAME.EXT wait
  455. status cdxa_2 mode wait
  456. =stopped
  457.  
  458. play cdxa_2 from 10000 to 40000
  459. status cdxa_2 mode wait
  460. =playing
  461. @PAUSE 10000
  462. @SET_EVENT THREAD2 0
  463. @SET_EVENT THREAD1 1
  464. @WAIT_EVENT THREAD2 45000
  465.  
  466. # regain control
  467.  
  468. acquire cdxa_2 wait
  469. @WAIT_PASSDEVICE cdxa_2 45000
  470.  
  471.  
  472. # load element from *LOCAL* CD device and play asynchronously
  473. # for 10 seconds
  474.  
  475. # /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
  476. # --------------------------------------------------------------
  477. #
  478. # The \PATH\FILENAME.EXT on the following command line will need
  479. # to be changed to a path and filename on your test CDXA Disk.
  480. #                     --- SEE BELOW ---
  481. # --------------------------------------------------------------
  482. # \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
  483.  
  484. load cdxa_2 \PATH\FILENAME.EXT wait
  485. status cdxa_2 mode wait
  486. =stopped
  487.  
  488. play cdxa_2 from 10000 to 40000
  489. status cdxa_2 mode wait
  490. =playing
  491. @PAUSE 10000
  492. @SET_EVENT THREAD2 0
  493. @SET_EVENT THREAD1 1
  494. @WAIT_EVENT THREAD2 45000
  495.  
  496. # query the session masteraudio setting. Remember process 1
  497. # changed it to 10%. Now change it to 50%
  498.  
  499. masteraudio query volume wait
  500. =10
  501. masteraudio volume 50
  502.  
  503.  
  504. # regain control
  505.  
  506. acquire cdxa_2 wait
  507. @WAIT_PASSDEVICE cdxa_2 45000
  508.  
  509. # change time format to milliseconds format
  510.  
  511. set cdxa_2 time format milliseconds wait
  512.  
  513. # load an .xa file from *LOCAL* disc
  514.  
  515. # /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
  516. # --------------------------------------------------------------
  517. #
  518. # The \PATH\FILENAME.EXT on the following command line will need
  519. # to be changed to a path and filename on your test CDXA Disk.
  520. #                     --- SEE BELOW ---
  521. # --------------------------------------------------------------
  522. # \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
  523.  
  524. load cdxa_2 \PATH\FILENAME.EXT wait
  525. status cdxa_2 mode wait
  526. =stopped
  527.  
  528. # seek to 10 seconds into currently loaded element
  529.  
  530. seek cdxa_2 to 10000 notify
  531. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_SEEK #23
  532. @WAIT_NOTIFY 23 45000
  533.  
  534. # play asynchronously for 3 seconds
  535.  
  536. play cdxa_2
  537. @PAUSE 3000
  538.  
  539. # close device instance
  540.  
  541. close cdxa_2 wait
  542.  
  543. # open cdxa device instance non-exclusively
  544.  
  545. open cdxa alias cdxa_2 shareable wait
  546. status cdxa_2 mode wait
  547. =not ready
  548.  
  549. # load an .xa file from *LOCAL* disc
  550.  
  551. # /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
  552. # --------------------------------------------------------------
  553. #
  554. # The \PATH\FILENAME.EXT on the following command line will need
  555. # to be changed to a path and filename on your test CDXA Disk.
  556. #
  557. # --------------------------------------------------------------
  558. # \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
  559.  
  560. load cdxa_2 \PATH\FILENAME.EXT wait
  561. status cdxa_2 mode wait
  562. =stopped
  563.  
  564. # cue for play
  565.  
  566. cue cdxa_2 output wait
  567.  
  568. # play for 3 seconds
  569.  
  570. play cdxa_2 notify
  571. +MM_MCINOTIFY MCI_NOTIFY_ABORTED MCI_PLAY
  572. @PAUSE 3000
  573.  
  574. @SET_EVENT THREAD2 0
  575. @SET_EVENT THREAD1 1
  576. @WAIT_EVENT THREAD2 45000
  577.  
  578. # recover control from process 1
  579.  
  580. acquire cdxa_2 wait
  581. @WAIT_PASSDEVICE cdxa_2 45000
  582. pause cdxa_2 notify
  583. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_PAUSE #25
  584. @WAIT_NOTIFY 25 45000
  585.  
  586. @SET_EVENT THREAD2 0
  587. @SET_EVENT THREAD1 1
  588. @WAIT_EVENT THREAD2 45000
  589. @WAIT_PASSDEVICE cdxa_1 60000
  590.  
  591. # try to play cdxa device instance (expect error as process 1 has
  592. # control)
  593.  
  594. play cdxa_2 notify
  595. =!Instance inactive.
  596.  
  597. # try to gain control of resource (cd device/acpa) held exclusively
  598. # by process 1 (expect error)
  599.  
  600. acquire cdxa_2 wait
  601. =!Device is locked.
  602.  
  603. @SET_EVENT THREAD2 0
  604. @SET_EVENT THREAD1 1
  605. @WAIT_EVENT THREAD2 45000
  606.  
  607. # recover control from process 1
  608.  
  609. acquire cdxa_2 wait
  610. @WAIT_PASSDEVICE cdxa_2 45000
  611.  
  612. # resume play for 3 seconds
  613.  
  614. resume cdxa_2 notify
  615. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_RESUME
  616. @PAUSE 3000
  617.  
  618. @SET_EVENT THREAD2 0
  619. @SET_EVENT THREAD1 1
  620. @WAIT_EVENT THREAD2 45000
  621.  
  622. # recover control from process 1
  623.  
  624. acquire cdxa_2 wait
  625. @WAIT_PASSDEVICE cdxa_2 45000
  626. stop cdxa_2 notify
  627. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_STOP #28
  628. @WAIT_NOTIFY 28 45000
  629.  
  630. @SET_EVENT THREAD2 0
  631. @SET_EVENT THREAD1 1
  632. @WAIT_EVENT THREAD2 45000
  633.  
  634. # recover control from process 1
  635.  
  636. acquire cdxa_2 wait
  637. @WAIT_PASSDEVICE cdxa_2 45000
  638. seek cdxa_2 to start notify
  639. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_SEEK #30
  640. @WAIT_NOTIFY 30 45000
  641.  
  642. @SET_EVENT THREAD2 0
  643. @SET_EVENT THREAD1 1
  644. @WAIT_EVENT THREAD2 45000
  645.  
  646. # recover control from process 1
  647.  
  648. acquire cdxa_2 wait
  649. @WAIT_PASSDEVICE cdxa_2 45000
  650.  
  651. # play for 3 seconds
  652.  
  653. play cdxa_2 notify
  654. +MM_MCINOTIFY MCI_NOTIFY_ABORTED MCI_PLAY
  655. @PAUSE 3000
  656.  
  657. @SET_EVENT THREAD2 0
  658. @SET_EVENT THREAD1 1
  659. @WAIT_EVENT THREAD2 45000
  660.  
  661. # recover control from process 1
  662.  
  663. acquire cdxa_2 wait
  664. @WAIT_PASSDEVICE cdxa_2 45000
  665. pause cdxa_2 notify
  666. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_PAUSE #34
  667. @WAIT_NOTIFY 34 45000
  668.  
  669. @SET_EVENT THREAD2 0
  670. @SET_EVENT THREAD1 1
  671. @WAIT_EVENT THREAD2 45000
  672.  
  673. # recover control from process 1
  674.  
  675. acquire cdxa_2 wait
  676. @WAIT_PASSDEVICE cdxa_2 45000
  677.  
  678. # resume play for 3 seconds
  679.  
  680. resume cdxa_2 notify
  681. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_RESUME
  682. @PAUSE 3000
  683.  
  684. @SET_EVENT THREAD2 0
  685. @SET_EVENT THREAD1 1
  686. @WAIT_EVENT THREAD2 45000
  687.  
  688. # recover control from process 1
  689.  
  690. acquire cdxa_2 wait
  691. @WAIT_PASSDEVICE cdxa_2 45000
  692.  
  693. set cdxa_2 time format milliseconds wait
  694.  
  695. stop cdxa_2 notify
  696. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_STOP #37
  697. @WAIT_NOTIFY 37 45000
  698.  
  699. @SET_EVENT THREAD2 0
  700. @SET_EVENT THREAD1 1
  701. @WAIT_EVENT THREAD2
  702.  
  703.  
  704. # Do some statuses on the inactive instance
  705.  
  706. @WAIT_PASSDEVICE cdxa_1 60000
  707. status cdxa_2 time format wait
  708. =milliseconds
  709.  
  710. status cdxa_2 ready wait
  711. =FALSE
  712.  
  713. @SET_EVENT THREAD2 0
  714. @SET_EVENT THREAD1 1
  715. @WAIT_EVENT THREAD2 45000
  716.  
  717. # recover control from process 1
  718.  
  719. acquire cdxa_2 wait
  720. @WAIT_PASSDEVICE cdxa_2 45000
  721.  
  722. seek cdxa_2 to end notify
  723. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_SEEK #39
  724. @WAIT_NOTIFY 39
  725.  
  726. # close cdxa device instance for this process
  727.  
  728. close cdxa_2 notify
  729. +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_CLOSE #40
  730. @WAIT_NOTIFY 40 45000
  731.  
  732. @SET_EVENT THREAD2 0
  733. @SET_EVENT THREAD1 1
  734.